package com.springcloudtest.feigntest.hello;


import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

@Component
public class FeignRequestInterceptor implements RequestInterceptor {

    @Override
    public void apply(RequestTemplate template) {
        System.out.println("feign request interceptor");
        var attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
    }
}
